﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using DevExpress.XtraBars.Ribbon;

namespace SAF.Controls.Test
{
    public partial class Form1 : RibbonForm
    {
        public Form1()
        {
            InitializeComponent();
            this.Load += new EventHandler(Form1_Load);
        }

        void Form1_Load(object sender, EventArgs e)
        {
            Program.SendToPreviousInstance();
            try
            {
                //Splasher.Status = "初始化报表1...";
                //Thread.Sleep(2000);

                //Splasher.Status = "初始化报表2...";
                //Thread.Sleep(2000);

                //Splasher.Status = "初始化报表3...";
                //Thread.Sleep(2000);

                //Splasher.Status = "初始化报表4...";
                //Thread.Sleep(2000);

                SplashScreen.Status = "打开系统...";
                Thread.Sleep(500);
                SplashScreen.Close();
            }
            catch
            {
                SplashScreen.Close();
                throw;
            }
        }

        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            XtraForm1 frm = new XtraForm1();
            frm.MdiParent = this;
            frm.Show();
        }

        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            XtraForm2 frm = new XtraForm2();
            frm.MdiParent = this;
            frm.Show();
        }

    }
}
